package com.quasar.hpatient.bean.home_health;

import android.text.TextUtils;

import java.util.List;

import lib.quasar.recycler.model.MultModel;

public class HealthBean {

    private String age = "";
    private HealthEventBean event;

    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }

    public HealthEventBean getEvent() {
        return event;
    }

    public void setEvent(HealthEventBean event) {
        this.event = event;
    }

    public static final class HealthEventBean {

        private List<HealthEventItemBean> json_event;

        public List<HealthEventItemBean> getJson_event() {
            return json_event;
        }

        public void setJson_event(List<HealthEventItemBean> json_event) {
            this.json_event = json_event;
        }

        public final static class HealthEventItemBean implements MultModel {

            private String event_type = "";
            private String description = "";
            private String duration_Length = "";
            private String event_datetime = "";
            private String event_name = "";
            private String editor_type = "";

            public String getEvent_type() {
                return event_type;
            }

            public void setEvent_type(String event_type) {
                this.event_type = event_type;
            }

            public String getDescription() {
                return description;
            }

            public void setDescription(String description) {
                this.description = description;
            }

            public String getDuration_Length() {
                return duration_Length;
            }

            public void setDuration_Length(String duration_Length) {
                this.duration_Length = duration_Length;
            }

            public String getEvent_datetime() {
                return event_datetime;
            }

            public void setEvent_datetime(String event_datetime) {
                this.event_datetime = event_datetime;
            }

            public String getEvent_name() {
                return event_name;
            }

            public void setEvent_name(String event_name) {
                this.event_name = event_name;
            }

            public String getEditor_type() {
                return editor_type;
            }

            public void setEditor_type(String editor_type) {
                this.editor_type = editor_type;
            }

            @Override
            public int getMultType() {
                if (TextUtils.isEmpty(event_type)) return MultModel.TYPE_0;
                else return MultModel.TYPE_1;
            }

            public String getTitie() {
                if ("11".equals(editor_type)) {
                    return "患者事件";
                } else if ("12".equals(editor_type)) {
                    return "特殊事件";
                } else {
                    return "未知事件";
                }
            }
        }
    }
}
